/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2025 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define KEY_A1_Pin GPIO_PIN_2
#define KEY_A1_GPIO_Port GPIOE
#define KEY_A2_Pin GPIO_PIN_3
#define KEY_A2_GPIO_Port GPIOE
#define KEY_A3_Pin GPIO_PIN_4
#define KEY_A3_GPIO_Port GPIOE
#define KEY_A4_Pin GPIO_PIN_5
#define KEY_A4_GPIO_Port GPIOE
#define KEY_A5_Pin GPIO_PIN_6
#define KEY_A5_GPIO_Port GPIOE
#define LED_R_Pin GPIO_PIN_0
#define LED_R_GPIO_Port GPIOC
#define LED_Y_Pin GPIO_PIN_1
#define LED_Y_GPIO_Port GPIOC
#define LED_G_Pin GPIO_PIN_2
#define LED_G_GPIO_Port GPIOC
#define Battery_V_Pin GPIO_PIN_0
#define Battery_V_GPIO_Port GPIOA
#define LCD_CS_Pin GPIO_PIN_3
#define LCD_CS_GPIO_Port GPIOA
#define S_DAC_Pin GPIO_PIN_4
#define S_DAC_GPIO_Port GPIOA
#define LCD_SCK_Pin GPIO_PIN_5
#define LCD_SCK_GPIO_Port GPIOA
#define LCD_SDA_Pin GPIO_PIN_6
#define LCD_SDA_GPIO_Port GPIOA
#define LCD_SDO_Pin GPIO_PIN_7
#define LCD_SDO_GPIO_Port GPIOA
#define LCD_DCX_Pin GPIO_PIN_4
#define LCD_DCX_GPIO_Port GPIOC
#define LCD_RST_Pin GPIO_PIN_5
#define LCD_RST_GPIO_Port GPIOC
#define SystemPower_V_Pin GPIO_PIN_0
#define SystemPower_V_GPIO_Port GPIOB
#define Ultra_VOUT_Pin GPIO_PIN_1
#define Ultra_VOUT_GPIO_Port GPIOB
#define LCD_L_EN_Pin GPIO_PIN_8
#define LCD_L_EN_GPIO_Port GPIOE
#define LCD_EN_Pin GPIO_PIN_9
#define LCD_EN_GPIO_Port GPIOE
#define RotorOpto_1_Pin GPIO_PIN_11
#define RotorOpto_1_GPIO_Port GPIOE
#define RotorOpto_2_Pin GPIO_PIN_13
#define RotorOpto_2_GPIO_Port GPIOE
#define StepMotorOpto_Pin GPIO_PIN_14
#define StepMotorOpto_GPIO_Port GPIOE
#define StepMotorOpto2_Pin GPIO_PIN_10
#define StepMotorOpto2_GPIO_Port GPIOB
#define VOICE_CMD_Pin GPIO_PIN_12
#define VOICE_CMD_GPIO_Port GPIOB
#define VOICE_DAT_Pin GPIO_PIN_13
#define VOICE_DAT_GPIO_Port GPIOB
#define WDI_Pin GPIO_PIN_15
#define WDI_GPIO_Port GPIOB
#define P_DIR_Pin GPIO_PIN_13
#define P_DIR_GPIO_Port GPIOD
#define P_EN_Pin GPIO_PIN_14
#define P_EN_GPIO_Port GPIOD
#define Stepmotor_Mode2_Pin GPIO_PIN_15
#define Stepmotor_Mode2_GPIO_Port GPIOD
#define Stepmotor_Mode1_Pin GPIO_PIN_6
#define Stepmotor_Mode1_GPIO_Port GPIOC
#define DCMOTOR_SLEEP_N_Pin GPIO_PIN_7
#define DCMOTOR_SLEEP_N_GPIO_Port GPIOC
#define StepperMotor_Pwm_Pin GPIO_PIN_8
#define StepperMotor_Pwm_GPIO_Port GPIOC
#define RMOTOR_PWM_Pin GPIO_PIN_9
#define RMOTOR_PWM_GPIO_Port GPIOC
#define MOTOR_DIR_Pin GPIO_PIN_8
#define MOTOR_DIR_GPIO_Port GPIOA
#define Bagtype1_Pin GPIO_PIN_9
#define Bagtype1_GPIO_Port GPIOA
#define Bagtype2_Pin GPIO_PIN_10
#define Bagtype2_GPIO_Port GPIOA
#define V5V_ENn_Pin GPIO_PIN_11
#define V5V_ENn_GPIO_Port GPIOC
#define UART5_TX_Pin GPIO_PIN_12
#define UART5_TX_GPIO_Port GPIOC
#define Ultra_P_Test_Pin GPIO_PIN_0
#define Ultra_P_Test_GPIO_Port GPIOD
#define PD1_Pin GPIO_PIN_1
#define PD1_GPIO_Port GPIOD
#define UART5_RX_Pin GPIO_PIN_2
#define UART5_RX_GPIO_Port GPIOD
#define TX1_Pin GPIO_PIN_5
#define TX1_GPIO_Port GPIOD
#define RX1_Pin GPIO_PIN_6
#define RX1_GPIO_Port GPIOD
#define CHG_STATUS_Pin GPIO_PIN_7
#define CHG_STATUS_GPIO_Port GPIOD
#define POWER_ON_H_Pin GPIO_PIN_4
#define POWER_ON_H_GPIO_Port GPIOB
#define KEY_POWER_Pin GPIO_PIN_5
#define KEY_POWER_GPIO_Port GPIOB
#define Motor_Puls_o_Pin GPIO_PIN_6
#define Motor_Puls_o_GPIO_Port GPIOB
#define ACDC_STATUS_Pin GPIO_PIN_7
#define ACDC_STATUS_GPIO_Port GPIOB
#define FRAM_SCL_Pin GPIO_PIN_8
#define FRAM_SCL_GPIO_Port GPIOB
#define FRAM_SDA_Pin GPIO_PIN_9
#define FRAM_SDA_GPIO_Port GPIOB
#define PE0_Pin GPIO_PIN_0
#define PE0_GPIO_Port GPIOE
#define SYS_12VEn_Pin GPIO_PIN_1
#define SYS_12VEn_GPIO_Port GPIOE

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
